package woniuxy.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author: linKe
 * @Date: 2021/12/28 18:51
 * @FileName: CommonResult
 * @version: 1.0
 * @Description: 全局统一响应
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResult<T> {
    private T data;
    private String message;
    private Integer code;
    public CommonResult(String message, Integer code) {
        this(null, message, code);
    }

    public CommonResult(T data) {
        this(data, "操作成功", 200);
    }

}
